#include "StdAfx.h"
#include "AnimationTranslateRoundUpButton.h"

CAnimationTranslateRoundUpButton::CAnimationTranslateRoundUpButton(void)
{
	m_time = 0;
	m_location = CGrVector(0, 0, 0);
}

CAnimationTranslateRoundUpButton::~CAnimationTranslateRoundUpButton(void)
{
}

void CAnimationTranslateRoundUpButton::Update(void)
{
	m_time++;
	m_time %= 200;
	// move it .195 and back
	if((m_time >= 0) && (m_time < 7))
	{
		m_node->SetProperties(m_node->GetX(), m_node->GetY() -  .0196, m_node->GetZ() - .0196);
	}
	else if((m_time >= 7) && (m_time < 11))
	{
		m_node->SetProperties(m_node->GetX(), m_node->GetY() + .0275, m_node->GetZ() + .0275);
	}
}